package com.dingreading.cloud.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 实体类。
 *
 * @author Administrator
 * @since 2024-11-18
 */
@Data
@Table("store_management_fee")
public class StoreManagementFee implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()")
    private Date addTime;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private Date editTime;

    private String addStaffUid;

    private String addStaffName;

    private String lastStaffUid;

    private String lastStaffName;

    private String corpUid;

    private String storeUid;

    @RelationOneToOne(
            selfField = "storeUid",
            targetTable = "stores",
            targetField = "uid",
            valueField = "storeName"
    )
    @Column(ignore = true)
    private String storeName;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date expiryTime;

    /**
     * 管理费金额
     */
    private Double amount;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date payTime;

    private Double payAmount;

    /**
     * 缴费状态 1.已缴 0.未缴 -1.关闭
     */
    private Integer status;

    /**
     * 缴费凭证
     */
    private String url;

    /**
     * 备注
     */
    private String remark;

    /**
     * 关闭备注
     */
    private String closeRemark;

    /**
     * 关闭时间
     */
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date closeTime;

    /**
     * 缴费操作人
     */
    private String operatorUid;

    /**
     * 缴费操作人
     */
    private String operatorName;

    @RelationOneToMany(selfField = "id", targetField = "feeId")
    @Column(ignore = true)
    private List<StoreManagementFeeImg> imgList;

}
